package com.zhanglijie.base.threadmethod.threadpool;

import java.util.concurrent.LinkedBlockingQueue;
import java.util.concurrent.ThreadPoolExecutor;
import java.util.concurrent.TimeUnit;

/**
 * @author zhanglijie
 * @version 1.0
 * @since 1.1.0 2022/3/13 0013 1:22
 */
public class Test {
    public static void main(String[] args) {
        ThreadPoolExecutor threadPoolExecutor = new ThreadPoolExecutor(1, 1, 2, TimeUnit.SECONDS,
            new LinkedBlockingQueue<>());
        threadPoolExecutor.execute(()->{
            System.out.println("线程池执行方式");
        });
    }
}
